The invention relates generally to computer display technology and, more particularly, to the application of visual effects using a programmable graphics processing unit during frame-buffer composition in a computer system.
Presentation of video on digital devices is becoming more common with the increases in processing power, storage capability and telecommunications speed. Programs such as QuickTime by Apple Computer, Inc., allow the display of various video formats on a computer. In operation, QuickTime must decode each frame of the video from its encoded format and then provide the decoded image to a compositor in the operating system for display.
In most video streams, while luminance values are provided for every pixel, the chroma values are subsampled so that no chroma values are provided for selected pixels, just luminance values. The most common format is 4:2:2. Y defines a luminance value while Cb and Cr define blue and red chroma values. Thus a 4:2:2 format would provide a data stream of Y1Cb1Y2Cr1Y3Cb2Y4Cr2. Digital video or DV is typically compressed to 4:1:1 or Y1Cb1Y2Y3Cr1Y4. Highly compressed digital video streams such as MPEG2 or H.264 use a 4:2:0 format or Y1Cb1Y2Y3Cr1Y4. Many other formats are used and can be envisioned.
Digital graphics units simply duplicate the prior chroma values into the missing or unprovided locations or samples. This effectively reduces the clarity of the reproduced image by effectively smearing the chroma information over a number of pixels, typically two or four, depending on the compression format used.
To further complicate the rendition of the video information, different formats sample both the luminance and chroma values from different locations. For example, MPEG1 uses luminance values from the four corners of a square, with the chroma value coming from the center of the square, while MPEG2 and H.264 use luminance values from the four corners but use a chroma value from the center of the left or leading edge. In further contrast, DV or 4:1:1 uses four linear luminance samples, with the chroma value from the same location as the first luminance value. The 4:2:2 format typically uses four linear luminance values, with the first and third being the locations of the chroma values. Thus the typical smearing performed by the graphics units further distorts the color rendition for the compressed video streams because of inaccuracies in reproducing the chroma values.
Because of the limited power of the CPU, it has not been possible to provide more realistic color presentation from a compressed video stream.
Thus, it would be beneficial to provide a mechanism by which compressed video can have improved chroma value application for each pixel in cases where the chroma has been subsampled.